<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
    <link th:href="@{/erp/assets/css/bootstrap.min.css}" rel="stylesheet" />
    <link rel="stylesheet" th:href="@{/erp/css/style.css}"/>
    <link th:href="@{/erp/assets/css/codemirror.css}" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/erp/assets/css/ace.min.css}" />
    <link rel="stylesheet" th:href="@{/erp/font/css/font-awesome.min.css}" />
    <link rel="stylesheet" th:href="@{/erp/Widget/zTree/css/zTreeStyle/zTreeStyle.css}" type="text/css">
    <link th:href="@{/erp/Widget/icheck/icheck.css}" rel="stylesheet" type="text/css" />
    <!--[if IE 7]>
    <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
    <![endif]-->
    <!--[if lte IE 8]>
    <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
    <![endif]-->
    <script th:src="@{/erp/js/jquery-1.9.1.min.js}"></script>
    <script th:src="@{/erp/assets/js/bootstrap.min.js}"> </script>
    <script th:src="@{/erp/assets/js/typeahead-bs2.min.js}"></script>
    <!-- page specific plugin scripts -->
    <script th:src="@{/erp/assets/js/jquery.dataTables.min.js}"></script>
    <script th:src="@{/erp/assets/js/jquery.dataTables.bootstrap.js}"></script>
    <script type="text/javascript" th:src="@{/erp/js/H-ui.js}"></script>
    <script type="text/javascript" th:src="@{/erp/js/H-ui.admin.js}"></script>
    <script th:src="@{/erp/assets/layer/layer.js}" type="text/javascript" ></script>
    <!--<script th:src="@{/erp/assets/laydate/laydate.js}" type="text/javascript"></script>-->
    <script type="text/javascript" th:src="@{/erp/Widget/zTree/js/jquery.ztree.all-3.5.min.js}"></script>
    <script th:src="@{/erp/js/lrtk.js}" type="text/javascript" ></script>
<title>合作关系申请</title>
<script type="text/javascript">
    $(function () {
        var divv = document.getElementById("typediv2");
        var div = document.getElementById("typediv1");

        if ($('#aba')[0].checked) {
            divv.style.display = "block";
            //$('#aba').click=function(){return false;};
            document.getElementById("aba").disabled="true";
            $('#abb').val()=="";
        } else {
            divv.style.display = "none";
        }

        if ($('#abb')[0].checked) {
            div.style.display = "block";
           // $('#abb').click=function(){return false;};
           document.getElementById("abb").disabled="true";
           $('#abb').val()=="";
        } else {
            div.style.display = "none";
        }
    })

/*var test = function(test){
    var divv = document.getElementById("typediv2");  
    if(test.checked  ){ 
        divv.style.display = "block"; 
    }else{ 
        divv.style.display = "none"; 
    } 
} 

//function testt(){
//alert("选中");
var testt = function(testt){ 
    var div = document.getElementById("typediv1"); 
    if(testt.checked){ 
        div.style.display = "block"; 
    }else{ 
        div.style.display = "none"; 
    } 
}  */
</script>
</head>
<body>
<div class="margin clearfix">
    <div class="detailed_style clearfix">
        <em class=""></em>

        <div class="shop_logo"><img th:src="@{/erp/images/detailnoimg.png}"/></div>
        <ul class="shop_content clearfix" th:each="company:${allrelation}">
            <li class="shop_name"><label class="label_name">企业名称：</label>
                <span class="info"  th:text="${company.company.companyName}"></span>
                <div class="Authenticate"><i class="icon-yxrz"></i><i class="icon-yhk"></i><i class="icon-sjrz"></i><i class="icon-grxx"></i></div>
            </li>

            <li><label class="label_name">企业类型：</label><span class="info" th:text="${company.company.companyType}"></span></li>

            <li><label class="label_name">经营范围：</label><span class="info" th:text="${company.company.businessScope}"></span></li>

            <li><label class="label_name">成立日期：</label><span class="info" th:text="${company.company.creatTime}"></span>
            </li>
            <li><label class="label_name">状&nbsp;&nbsp;&nbsp;&nbsp;态： </label>&nbsp;&nbsp;<span class="label label-success radius" th:text="${company.company.companyStatus}=='on'?'已认证':'待认证'"></span></li>

            <li><label class="label_name">申请人姓名：</label><span class="info" th:text="${company.company.legal}"></span>
            </li>
            <li><label class="label_name">申请时间：</label><span class="info" th:text="${company.company.creatTime}"></span>
            </li>
            <li><label class="label_name">电子邮箱：</label><span class="info" th:text="${company.company.companyEmail}"></span>
            </li>
            <li><label class="label_name">固定电话：</label><span class="info" th:text="${company.company.fixedTel}"></span>
            </li>
            <!--<li><label class="label_name" >企业ID：</label><span class="info" th:text="${company.company.id}"></span>
            </li>-->
            <input type="hidden" th:value="${company.company.id}" id="TParComB">

    </div>
      <div class="Store_Introduction">
      <div class="title_name">企业简介</div>
      <div class="info">
       <br />
      </div>
      </div>
   <div class="Store_Introduction">
   <div class="title_name">申请成为</div>

   <div class="info">
    <div class="form-group"><label class="col-sm-1 control-label no-padding-right" for="form-field-1">
	<label><input  type="checkbox"  name="yy"  value="0"   th:checked="${count}=='1' "id="aba"
                   class="ace" ><span class="lbl">
    </span></label>客户</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<label class="col-sm-1 control-label no-padding-right" for="form-field-1">
	<label><input type="checkbox"  name="yy"  value="1"   th:checked="${count2}=='1' " id="abb"
                  class="ace" ><span class="lbl"></span>
    </label>供应商</label>
    </div>
    <div class="form-group"><i style="color:#FF0000">*</i><i style="color:#999999">一次只能发送一条请求,且先申请成为供应商才能申请为客户</i></div>
	<div class="form-group"><i style="color:#FF0000">*</i><i style="color:#999999">选择客户可设置对方直购价，发送后对方可见</i></div>
    <div class="form-group"><i style="color:#FF0000">*</i><i style="color:#999999">选择经销商可上传合同附件，通过后可查看直购价</i></div>
   </div>
</div>
</div>


<br/>



<div class="Store_Introduction" style="display: none;"  id="typediv2">
    <!--    <div class="title_name">选择客户操作</div>-->
          <br/>
  <!--  <div class="border clearfix">
       <span class="l_f">
        <a title="批量修改" onclick="member_edittt()" class="btn btn-warning Order_form"><i class="icon-plus"></i>批量修改</a>
		 <a title="设置返利" onclick="member_editttaa()" class="btn btn-info  Order_form1"><i class="icon-plus"></i>设置返利</a>
       </span>
       <span class="r_f">共：<b>2334</b>件商品</span>
     </div>-->

     <!--产品列表展示-->
     <div class="h_products_list clearfix" id="products_list">
         <div id="scrollsidebar" class="left_Treeview">
                    <div class="show_btn" id="rightArrow"><span></span></div>
         <div class="widget-box side_content" >
                  <div class="side_title"><a title="隐藏" class="close_btn"><span></span></a></div>
               <div class="side_list">
                            <!-- <div class="widget-header header-color-green2"><h4 class="lighter smaller">企业产品列表</h4></div>-->
                <div class="widget-body">
                            <div class="widget-main padding-8"><div id="treeDemo" class="ztree"></div>
               </div>
               </div>
               </div>
               </div>
               </div>
         <!--  <div class="table_menu_list" >
              <table class="table table-striped table-bordered table-hover" id="sample-table" style="width:100%">
               <thead>
             <tr>
                       <th width="60px" style="width:20px!important;"><label style="width:2px"><input type="checkbox" class="ace"><span class="lbl"></span></label></th>
                       <th width="60px" style="width:60px!important;">序号</th>
                       <th  width="60px" style="width:60px!important;">产品名称</th>
                       <th  width="60px" style="width:60px!important;">原价格（元）</th>
                       <th width="60px" style="width:60px!important;">修改价（元）</th>
                       <th  width="60px" style="width:60px!important;">操作</th>
                       <th  width="60px" style="width:60px!important;">库存件数</th>
                       <th width="60px"  style="width:60px!important;">加入时间</th>
                       <th  width="60px" style="width:60px!important;">审核状态</th>


                 </tr>
               </thead>
           <tbody>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>

           </tbody>-->
                  </table>
              </div>
              </div></div></div>
</div> 


   
<div class="Store_Introduction" style="display: none;"  id="typediv1">
   <!--          <div class="title_name">供应商操作</div>-->
           <br/><br/>
       <!--     <div class="form-group">
                  <label class="col-sm-1 control-label no-padding-right" for="form-field-1"><i></i>上传合同： </label>
                  <input type="file" style="margin-left:150px;" onchange="previewImage(this)" />
            </div>
          <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right" for="form-field-1"><i></i>签订日期： </label>
            <div class="col-sm-9"><input class="inline laydate-icon" id="start1" style=" margin-left:10px;width:300px"></div>
          </div>
          <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right" for="form-field-1"><i></i>到期时间： </label>
           <div class="col-sm-9"><input class="inline laydate-icon" id="start2" style=" margin-left:10px;width:300px"></div>
          </div>
		  <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right" for="form-field-1"><i></i>合同名称： </label>
           <div class="col-sm-9"><input type="text" id="website-title"  style=" width:300px" class="col-xs-10"></div>
          </div>
		   <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right" for="form-field-1"><i></i>代理产品： </label>
           <div class="col-sm-9"><input type="text" id="website-title"  style=" width:300px" class="col-xs-10"></div>
          </div>
		  <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right" for="form-field-1"><i></i>添加备注： </label>
           <div class="col-sm-9"><input type="text" id="website-title"  style=" width:300px" class="col-xs-10"></div>
          </div>
		  <br/>-->
</div>
	<br/>
	 <div class="Button_operation"> 
			<button  onclick="tiaoz()"  class="btn btn-primary radius" type="button"><i class="fa fa-save "></i>&nbsp;&nbsp;发送&nbsp;&nbsp;</button>
				
				<button onclick="history.go(-1)" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>

			<br/>
			<br/>
			<br/>
			<br/>

<div class="add_menber" id="add_menber_style" style="display:none"><br/>
          <label  style="margin-left:50px;width:300px">
		  <input name="Fruit" type="radio" value="" />上调&nbsp;&nbsp;&nbsp;&nbsp; <input name="Fruit" type="radio" value="" />下调：
		   <input type="text" id="website-title" value="" style=" width:100px">% </label>
		   
</div>
<div class="add_menber" id="add_menber_styleee" style="display:none"><br/>
          <label  style="margin-left:30px">
		 订购总价：<input type="text" value="" style=" width:100px">元 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返利百分比：<input type="text" value="" style=" width:100px">%
</label>
</div>
</body>
</html>
<script>
function tiaoz(){
	layer.confirm('确认要发送吗？',function(index){
        var data = $("#form").serialize()
        var abc = [];
        abc.push($('#TParComB').val());

        //定义一个空数组
        $("input[name='yy']:checked").each(function (i) {    //把所有被选中的复选框的值存入数组
            abc[i+1] = $(this).val();
        });

        $.ajax({
            type:'post',
            datatype:'json',
            url:'/customer/addPar',
            data: {'abc':abc},
            success:function (data) {
                layer.msg('已发送!',{icon:1,time:1000});
            },
            error:function(){
                alert("请求失败")
            }
        });


		layer.msg('已发送!',{icon:1,time:1000});
        window.location.href="/customer/my_clientele_bak.html";

	});
}






</script>
<script type="text/javascript">


</script>
